<template>
  <a-button @click="routerToBefore"><RollbackOutlined />返回上一级</a-button>
</template>
<script>
import { useRouter } from "vue-router";
import { RollbackOutlined } from "@ant-design/icons-vue";
export default {
  components: {
    RollbackOutlined,
  },
  setup() {
    //返回
    const router = useRouter();
    function routerToBefore() {
      router.back();
    }
    return {
      routerToBefore,
    };
  },
};
</script>
